﻿@{
    ViewData["Title"] = "后台管理菜单";
}
@using Microsoft.AspNetCore.Mvc.Localization;
@inject IViewLocalizer Localizer;

<blockquote class="layui-elem-quote quoteBox">
    <form class="layui-form">
        @Html.AntiForgeryToken()
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" class="layui-input searchVal" placeholder="@Localizer["SearchPlaceholder"]" />
            </div>
            <a class="layui-btn search_btn" data-type="reload">@Localizer["Search"]</a>
        </div>
        <div class="layui-inline">
            <a class="layui-btn layui-btn-normal addMenu_btn"><i class="layui-icon">&#xe61f;</i>@Localizer["AddMenu"]</a>
        </div>
        <div class="layui-inline">
            <a class="layui-btn layui-btn-danger layui-btn-normal delAll_btn"><i class="layui-icon layui-icon-delete"></i>@Localizer["BatchDelete"]</a>
        </div>
    </form>
</blockquote>
<table id="menuList" lay-filter="menuList"></table>
<script type="text/html" id="IsDisplay">
    {{# if(d.IsDisplay === 1){}}
    <input type="checkbox" name="IsDisplay" value="{{d.Id}}" lay-filter="IsDisplay" lay-skin="switch" lay-text="是|否" checked />
    {{# }else{}}
    <input type="checkbox" name="IsDisplay" value="{{d.Id}}" lay-filter="IsDisplay" lay-skin="switch" lay-text="是|否" />
    {{# }}}
</script>
<script type="text/html" id="menuListBar">
    <a class="layui-btn layui-btn-xs" lay-event="edit">@Localizer["Modify"]</a>
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">@Localizer["Delete"]</a>
</script>
@section Scripts{
    <script type="text/javascript" src="~/layui/layui.js"></script>
    <script src="~/js/menu/menuList.js?_=@DateTime.Now.ToString("yyyyMMddHHmmss")"></script>
}